package com.barunsw.bwf.dhtmlx_sample.tutorial5;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/tutorial5")
public class DhtmlxTutorial5Controller {
	@Autowired
	DhtmlxTutorial5Service dhtmlxTutorial5Service;


	@RequestMapping(value = "", method = RequestMethod.GET)
	public String tutorial5() {
		return "dhtmlx_tutorial/tutorial5";
	}
	
	@RequestMapping(value="/book", method=RequestMethod.GET)
	public @ResponseBody List<DhtmlxTutorial5BookVo> getBookList() throws Exception {
		List<DhtmlxTutorial5BookVo> bookList = dhtmlxTutorial5Service.selectList();
		return bookList;
	}
}
